package cn.gson.work.model.pojos;

import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
public class Car {
    private long carId;
    private Long appId;
    private String carPlate;
    private String carName;
    private Long carPeople;
    private Date carTime;
    private Long carPrice;
    private String carBrand;
    private String carEngine;
    private String carVin;
    private String carTravel;
    private String carStage;
    private String carRemark;
    private long userNo;
    private User user;

    @Basic
    @Column(name = "USER_NO")
    public long getUserNo() {
        return userNo;
    }

    public void setUserNo(long userNo) {
        this.userNo = userNo;
    }

    @ManyToOne
    @JoinColumn(name = "USER_NO",insertable = false,updatable = false)
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Id
    @Column(name = "CAR_ID")
    public long getCarId() {
        return carId;
    }

    public void setCarId(long carId) {
        this.carId = carId;
    }

    @Basic
    @Column(name = "APP_ID")
    public Long getAppId() {
        return appId;
    }

    public void setAppId(Long appId) {
        this.appId = appId;
    }

    @Basic
    @Column(name = "CAR_PLATE")
    public String getCarPlate() {
        return carPlate;
    }

    public void setCarPlate(String carPlate) {
        this.carPlate = carPlate;
    }

    @Basic
    @Column(name = "CAR_NAME")
    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    @Basic
    @Column(name = "CAR_PEOPLE")
    public Long getCarPeople() {
        return carPeople;
    }

    public void setCarPeople(Long carPeople) {
        this.carPeople = carPeople;
    }

    @Basic
    @Column(name = "CAR_TIME")
    public Date getCarTime() {
        return carTime;
    }

    public void setCarTime(Date carTime) {
        this.carTime = carTime;
    }

    @Basic
    @Column(name = "CAR_PRICE")
    public Long getCarPrice() {
        return carPrice;
    }

    public void setCarPrice(Long carPrice) {
        this.carPrice = carPrice;
    }

    @Basic
    @Column(name = "CAR_BRAND")
    public String getCarBrand() {
        return carBrand;
    }

    public void setCarBrand(String carBrand) {
        this.carBrand = carBrand;
    }

    @Basic
    @Column(name = "CAR_ENGINE")
    public String getCarEngine() {
        return carEngine;
    }

    public void setCarEngine(String carEngine) {
        this.carEngine = carEngine;
    }

    @Basic
    @Column(name = "CAR_VIN")
    public String getCarVin() {
        return carVin;
    }

    public void setCarVin(String carVin) {
        this.carVin = carVin;
    }

    @Basic
    @Column(name = "CAR_TRAVEL")
    public String getCarTravel() {
        return carTravel;
    }

    public void setCarTravel(String carTravel) {
        this.carTravel = carTravel;
    }

    @Basic
    @Column(name = "CAR_STAGE")
    public String getCarStage() {
        return carStage;
    }

    public void setCarStage(String carStage) {
        this.carStage = carStage;
    }

    @Basic
    @Column(name = "CAR_REMARK")
    public String getCarRemark() {
        return carRemark;
    }

    public void setCarRemark(String carRemark) {
        this.carRemark = carRemark;
    }

    @Override
    public String toString() {
        return "Car{" +
                "carId=" + carId +
                ", appId=" + appId +
                ", carPlate='" + carPlate + '\'' +
                ", carName='" + carName + '\'' +
                ", carPeople=" + carPeople +
                ", carTime=" + carTime +
                ", carPrice=" + carPrice +
                ", carBrand='" + carBrand + '\'' +
                ", carEngine='" + carEngine + '\'' +
                ", carVin='" + carVin + '\'' +
                ", carTravel='" + carTravel + '\'' +
                ", carStage='" + carStage + '\'' +
                ", carRemark='" + carRemark + '\'' +
                ", userNo=" + userNo +
                ", user=" + user +
                '}';
    }
}
